import { IParam, EntityBase } from "@/core";
import { IIBIZSample } from './interface/i-ibiz-sample';
import IBIZSampleKeys from './ibiz-sample-keys';

/**
 * 示例数据库基类
 * 基于template/src/api/{{appEntities}}/{{appEntities}}-base.ts.hbs生成  
 *
 * @export
 * @abstract
 * @class IBIZSampleBase
 * @extends { EntityBase }
 * @implements { IIBIZSample }
 */
export abstract class IBIZSampleBase extends EntityBase implements IIBIZSample {
	/**
	 * 实体名称
	 *
	 * @readonly
	 * @type {string}
	 * @memberof IBIZSampleBase
	 */
	get srfdename(): string {
		return 'IBIZSAMPLE';
	}

	/**
     * 当前实体所有属性
     *
     * @protected
     * @type {string[]}
     * @memberof IBIZSampleBase
     */
    protected get keys(): string[] {
        return IBIZSampleKeys;
    }

	/**
	 * Creates an instance of ConstactOppoBase.
	 * @param {*} [data]
	 * @memberof IBIZSampleBase
	 */
	constructor(data?: any) {
		super();
		this.setData(data);
	}

	/**
	 * 建立时间
	 **/
	createdate?: any;
	
	/**
	 * 其他样式链接4
	 **/
	oslink4?: any;
	
	/**
	 * 分组标题1
	 **/
	title1?: any;
	
	/**
	 * 更新人
	 **/
	updateman?: any;
	
	get srfmajortext(): string {
		return this.ibizsamplename;
	}

	set srfmajortext(val: string) {
		this.ibizsamplename = val;
	}
	/**
	 * 示例数据库名称
	 **/
	ibizsamplename?: any;
	
	/**
	 * 其他样式链接3
	 **/
	oslink3?: any;
	
	/**
	 * 链接1
	 **/
	link1?: any;
	
	get srfkey(): string {
		return this.ibizsampleid;
	}

	set srfkey(val: string) {
		this.ibizsampleid = val;
	}

	/**
	 * 示例数据库标识
	 **/
	ibizsampleid?: any;
	
	/**
	 * 分组标题6
	 **/
	title6?: any;
	
	/**
	 * 链接6
	 **/
	link6?: any;
	
	/**
	 * 分组标题5
	 **/
	title5?: any;
	
	/**
	 * 分组标题4
	 **/
	title4?: any;
	
	/**
	 * 更新时间
	 **/
	updatedate?: any;
	
	/**
	 * 其他样式链接1
	 **/
	oslink1?: any;
	
	/**
	 * 其他样式链接5
	 **/
	oslink5?: any;
	
	/**
	 * 其他样式链接6
	 **/
	oslink6?: any;
	
	/**
	 * 链接5
	 **/
	link5?: any;
	
	/**
	 * 链接3
	 **/
	link3?: any;
	
	/**
	 * 分组标题2
	 **/
	title2?: any;
	
	/**
	 * 其他样式链接2
	 **/
	oslink2?: any;
	
	/**
	 * 分组标题3
	 **/
	title3?: any;
	
	/**
	 * 链接4
	 **/
	link4?: any;
	
	/**
	 * 链接2
	 **/
	link2?: any;
	
	/**
	 * 示例类型
	 **/
	sampletype?: any;
	
	/**
	 * 建立人
	 **/
	createman?: any;
	

	/**
	 * 重置实体数据
	 *
	 * @param {IParam} [data={}]
	 * @memberof IBIZSampleBase
	 */
	reset(data: IParam = {}): void {
		super.reset(data);
		this.ibizsamplename = data.ibizsamplename || data.srfmajortext;
		this.ibizsampleid = data.ibizsampleid || data.srfkey;
	}
}